package com.juice.utils;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @desc:
 * @author: panxiyi
 * @date: 2023/4/13 11:22 下午
 */

@RestControllerAdvice
public class ProjectExceptionAdvice {

    @ExceptionHandler
    public R doException(Exception ex) {
        // 记录日志
        // 通知运维、开发
        return new R( "服务器暂时不可用，请稍后再试！");
    }
}
